#deck class
class Deck(object):
    def __init__(self,deckName):
        self.cards=[]
        self.deckName = deckName
    def __str__(self):
        return self.__repr__()
    def __repr__(self):
        return "%s Deck contains %s"%(self.deckName,self.cards)

    def append(self, card):
        self.cards.append(card)

    def __len__(self):
        return len(self.cards)

    def pop(self, index):
        """ pop the card (and return it) from the given index"""
        try:
            return self.cards.pop(index)
        except IndexError:
            print "SERIOUS FOOBAR."
            print "Asked to pop", index
            print "Len cards:", len(self.cards)

###manually add a new deck
##    def newDeck(self):
##        print "How many cards odoes the deck have?"
##        input1 = raw_input()
##        print "What type of cards are they?"
##        input2 = raw_input()
##        decks.append(Deck(input1,input2))
##
### a function designed to create the starting point of the decks at the beginning
###of the game.
##
##    def buildNewDecks(self,decks):
##        print "Building..."
##        self.decks = [Deck(10, "Situation"),
##                 Deck(25, "Hazard"),
##                 Deck(25, "Action")
##                 ]
##        print "Decks built"



#create the object for a single deck, then call each object for
#S_deck, H_deck and A_deck

if __name__ == "__main__":
    decks = [Deck( "Hazard"),
            Deck( "Action"),
            Deck( "Situation")]
    print decks
    # deck = Deck("")
    # deck.buildNewDecks()
    #deck.newDeck()
    #print decks
